public class ComparableTest implements Comparable<ComparableTest>{
	private String s1;
	private String s2;

	public String getS1() {
		return s1;
	}

	public void setS1(String s1) {
		this.s1 = s1;
	}

	public String getS2() {
		return s2;
	}

	public void setS2(String s2) {
		this.s2 = s2;
	}

	@Override
	public String toString() {
		return "ComparableTest [s1=" + s1 + ", s2=" + s2 + "]";
	}

	@Override
	public int compareTo(ComparableTest o) {
		
		// TODO Auto-generated method stub
		if(this.s1==null || this.s2==null) {
			return -1;
		}
		
		if(s1.compareTo(o.s1)==0) {
			return s2.compareTo(o.s2);
		} else{
			return s1.compareTo(o.s1);
		}
		
	}

}
